package com.mes.biz.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 工序完成记录对象 biz_production_order
 * @author hwg
 * @email hwg
 * @date 2023-05-15
 */
@Data
public class BizOrderProcessRecord extends BaseEntity<BizOrderProcessRecord>
{
    private static final long serialVersionUID = 1L;

    @FieldRemark(name = "订单ID",field = "orderId")
    private String orderId;

    @FieldRemark(name = "生产单号",field = "productionCode")
    private String productionCode;

    @FieldRemark(name = "产品ID",field = "productId")
    private String productId;

    @FieldRemark(name = "工序计划ID",field = "processPlanId")
    private String processPlanId;

    @FieldRemark(name = "工序ID",field = "processId")
    private String processId;

    @FieldRemark(name = "工序编号",field = "processCode")
    private String processCode;

    @FieldRemark(name = "工序名称",field = "processName")
    @Excel(name = "工序名称",sort = 9)
    private String processName;

    @FieldRemark(name = "单位工资",field = "unitSalary")
    @Excel(name = "单位工资",sort = 12)
    private BigDecimal unitSalary;

    @FieldRemark(name = "数量",field = "processVol")
    @Excel(name = "数量",sort = 11)
    private BigDecimal processVol;

    @FieldRemark(name = "完成工作量",field = "completedVol")
    private String completedVol;

    private String creator;
    @FieldRemark(name = "单位",field = "unit")
    private String unit;
    @FieldRemark(name = "排序",field = "sortNumber")
    private int sortNumber;

    /** 租户id */
    private String tenantId;

    //位置
    private String productPosition;

    @Excel(name = "单位工资",sort = 10)
    private String unitName;

    @FieldRemark(name = "销售单产品明细id",field = "orderProductId")
    private String orderProductId;

    private boolean flag;

    private String startDate;
    private String endDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date completedTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date completedLastTime;
    private Integer completedHour;
    private String warningStatus;
    private BigDecimal standardHours;
    private String orderNumber;
    private String address;
}
